package com.example.demo.Dao;

import com.example.demo.Entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserDao {

    Integer getUserR_id(String username);

    Integer getUserU_id(String username);

    User getUserByUsername(String username);

    User getUser(String username);

    Integer setUser(User user);

    Integer setAdmin(User user);

    Integer setEmployee(User user);

    List<User> selectUser(String name);

    User getUserByid(Integer id, Integer r_id);

    User updateUserByid(User user);

    User updateAdminByid(User user);

    User updateEmployeeByid(User user);

    List<User> getAllUser();

    List<User> getAllemployee();

    List<User> getUserBystr(String name);

    int updateEmployeePassword(Integer id, String password);

    int updateUserPassword(Integer id, String password);

    Integer countUser();

    Integer countAdmin();

    Integer countEmployee();
}
